#pragma once

#include <stdio.h>

#define SIZE 4096
#define NONE_FLUSH (1<<1) 
#define LINE_FLUSH (1<<2) 
#define FULL_FLUSH (1<<3)

typedef struct _myFILE
{
  int fileno;
  char outbuffer[SIZE];
  int cap;
  int pos;
  int flush_mode;
}myFILE;



myFILE* my_fopen(const char*pathnanme,const char* mode);

int my_fwrite(myFILE* fp,const char* s,int size);

int my_fclose(myFILE* fp);

const char *toString(int flag);

void DebugPrint(myFILE *fp);
